Skip to content

Conversation

@glevco
Copy link
Contributor

@glevco glevco commented Jan 21, 2026

Motivation

There are unused opcodes that were once created for a cancelled implementation. This PR defines a Feature Activation to remove them.

Acceptance Criteria

  • Add .venv to ignore of yamllint. It was complaining in my local env sometimes.
  • Create new Feature.OPCODES_V2 and respective setting HathorSettings.ENABLE_OPCODES_V2, defaulting to disabled.
  • Create OpcodeVersion, removing deprecated opcodes on V2, which is configured via feature activation.
    • SignedData.checksig is set to use V2 directly, without feature activation. This is allowed since there are no blueprints with SignedData on mainnet.
    • Mempool/relayed vertices use V2directly, so we reject txs with deprecated opcodes in the mempool.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Jan 21, 2026
@glevco glevco moved this from Todo to In Progress (WIP) in Hathor Network Jan 21, 2026
@glevco glevco force-pushed the feat/remove-unused-opcodes branch 4 times, most recently from 6b863ed to 746d648 Compare January 22, 2026 19:42
@glevco glevco changed the base branch from master to refactor/consensus-features January 22, 2026 19:42
@github-actions
Copy link

github-actions bot commented Jan 22, 2026

🐰 Bencher Report

Branchfeat/remove-unused-opcodes
Testbedubuntu-22.04
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
minutes (m)
(Result Δ%)
Lower Boundary
minutes (m)
(Limit %)
Upper Boundary
minutes (m)
(Limit %)
sync-v2 (up to 20000 blocks)📈 view plot
🚷 view threshold
1.69 m
(-1.68%)Baseline: 1.71 m
1.54 m
(91.53%)
2.06 m
(81.94%)
🐰 View full continuous benchmarking report in Bencher

@glevco glevco force-pushed the feat/remove-unused-opcodes branch 7 times, most recently from d094ac2 to 10a4030 Compare January 22, 2026 21:01
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 84.61538% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.70%. Comparing base (6ef1f93) to head (a5c6ab2).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
hathor/consensus/consensus.py 55.55% 10 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1563      +/-   ##
==========================================
- Coverage   86.24%   85.70%   -0.55%     
==========================================
  Files         439      439              
  Lines       33724    33769      +45     
  Branches     5280     5279       -1     
==========================================
- Hits        29086    28942     -144     
- Misses       3623     3812     +189     
  Partials     1015     1015              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@glevco glevco force-pushed the refactor/consensus-features branch 4 times, most recently from e4b1772 to 9fe977f Compare January 23, 2026 14:01
@glevco glevco force-pushed the feat/remove-unused-opcodes branch 4 times, most recently from fba3149 to ca88671 Compare January 23, 2026 15:12
@glevco glevco moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jan 23, 2026
@glevco glevco force-pushed the feat/remove-unused-opcodes branch from ca88671 to c7ccccb Compare January 23, 2026 18:43
msbrogli
msbrogli previously approved these changes Jan 23, 2026
@github-project-automation github-project-automation bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network Jan 23, 2026
@glevco glevco force-pushed the refactor/consensus-features branch from 9fe977f to 73d3e56 Compare January 24, 2026 20:20
@glevco glevco force-pushed the feat/remove-unused-opcodes branch from c7ccccb to 846a2b7 Compare January 26, 2026 14:27
@jansegre jansegre deleted the branch master January 26, 2026 14:54
@jansegre jansegre closed this Jan 26, 2026
@github-project-automation github-project-automation bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Jan 26, 2026
@glevco glevco moved this from Waiting to be deployed to In Review (Done) in Hathor Network Jan 26, 2026
@glevco glevco reopened this Jan 26, 2026
@glevco glevco changed the base branch from refactor/consensus-features to master January 26, 2026 14:56
@glevco glevco dismissed msbrogli’s stale review January 26, 2026 14:56

The base branch was changed.

@glevco glevco moved this from In Review (Done) to In Review (WIP) in Hathor Network Jan 26, 2026
@glevco glevco force-pushed the feat/remove-unused-opcodes branch from 0dfe92e to 3e32c9b Compare January 26, 2026 14:57
jansegre
jansegre previously approved these changes Jan 27, 2026
@glevco glevco force-pushed the feat/remove-unused-opcodes branch 3 times, most recently from 45156d5 to eec2ff0 Compare January 27, 2026 18:33
@msbrogli msbrogli force-pushed the feat/remove-unused-opcodes branch from d541770 to a5c6ab2 Compare January 27, 2026 23:54
@msbrogli msbrogli merged commit a5c6ab2 into master Jan 27, 2026
5 checks passed
@msbrogli msbrogli deleted the feat/remove-unused-opcodes branch January 27, 2026 23:54
@github-project-automation github-project-automation bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting to be deployed

Development

Successfully merging this pull request may close these issues.

4 participants